package com.example.demo.utils;

/**
 * @Author: WinstonDeng
 * @Description:
 * @Date: Created in 15:16 2020/4/11
 * @Modified by:
 */
public class ResultUtil {
    public static Result success(Object object) {
        Result result = new Result();
        result.setCode(200);
        result.setMsg("成功");
        result.setData(object);
        return result;
    }

    public static Result error(Integer code, String msg) {
        Result result = new Result();
        result.setCode(code);
        result.setMsg(msg);
        return result;
    }
}
